package com.xzp.ch06.anno;

import com.xzp.entity.Orders;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersAndDetailMapper {




    @Select("select * from orders where user_id=#{uid}")
    /*@Results(
            {
                    @Result(id = true, column = "id", property = "id"),
                    @Result(column = "id", property = "orderDetails", javaType = List.class),
         many=@Many(select = "com.xzp.ch06.anno.OrderDetailAndItemsMapper.selectDetailAndItems")
    })*/


public List<Orders>  selectOrdersAndDetailByUid(Integer uid);



}
